$color31:#313131;
$colorf0:#f0f0f0;
$colorfff:#fff;
$colore7:#e7e7e7;
$colorfa:#fafafa;
$color62:#626262;
$colord4:#d4d4d4;
$colora0:#a0a0a0;
$red:#ff5a5f;
$yellow:#feb501;
$color80:#80bd01;
$gap:5px;

body {
    height: 100%;
    width: 100%;
    font-size: 14px;
    color: #313131;
    overflow-x: hidden;
    line-height: 1;
}

.mt5 {
    margin-top: $gap;
}

.mt10 {
    margin-top: $gap*2;
}

.color80 {
    color: #42b983;
}

.clear {
    zoom: 1;
    &:after {
        content: '';
        display: table;
        clear: both;
    }
}

#app {
    height: 100%;
}

.display-flex {
    display: -moz-box;
    /* Firefox */
    display: -ms-flexbox;
    /* IE10 */
    display: -webkit-box;
    /* Safari */
    display: -webkit-flex;
    /* Chrome, WebKit */
    display: flexbox;
    display: flex;
}

.break {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user {
    width: 100%;
    margin: $gap*2 0;
    padding: 0 $gap*2;
    display: flex;
    .tab {
        display: inline-block;
        width: $gap*8;
        color: $color62;
        border-radius: $gap;
        background-color: $colore7;
        margin-right: $gap*2;
        text-align: center;
        height: $gap*4;
        line-height: $gap*4;
        vertical-align: middle;
    }
    .good {
        background-color: $color80;
        color: $colorfff;
    }
    .title {
        font-size: $gap*3.6;
        font-weight: bold;
        display: block;
        width: 100%;
        flex: 1;
        @extend .break;
    }
    .head {
        display: inline-block;
        width: $gap*9;
        height: $gap*9;
        margin-right: $gap*2;
        border-radius: 10px;
        img {
            width: $gap*9;
            border: 2px solid #fff6e6;
            border-radius: 50%;
        }
    }
    .info {
        overflow: hidden;
        display: block;
        width: 100%;
        flex: 1;
        &:after {
            clear: both;
        }
        .t-title {
            font-size: $gap*3.6;
            font-weight: bold;
            width: 100%;
            color: #333;
            @extend .break;
        }
        .mt12 {
            margin-top: 12px;
        }
        .cl {
            display: inline-block;
            width: 68%;
            .name {
                color: $color62;
            }
            .mt10 {
                margin-top: $gap*2;
            }
        }
        .cr {
            width: 30%;
            display: inline-block;
            text-align: right;
            .name {
                margin-top: $gap*2;
                color: $color80;
                font-size: $gap*2.4;
            }
        }
    }
}

.reply_content {
    padding: 0 $gap*3;
    margin-bottom: $gap*3;
    img {
        width: auto\9;
        height: auto;
        max-width: 100%;
        vertical-align: middle;
        border: 0;
        -ms-interpolation-mode: bicubic;
    }
    p {
        line-height: 1.3;
    }
}

.no-data {
    width: 100%;
    height: 100%;
    padding: 40% 0;
    color: $colord4;
    display: inline-block;
    font-size: 18px;
    text-align: center;
}


/*
**   rework 分界线
**   ------------
*/


/* 颜色 */

$white: #ffffff;
$light: #d5dbdb;
$title: #2c3e50;
$text: #34495e;

/* 基础布局 */

$padding: 15px;
$border: 1px solid $light;
$radius: 4px;
$font-title: 16px;
$font-content: 14px;
$font-info: 12px;
$font-tag: 10px;

/* 综合布局 */

.text-overflow {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.title {
    color: $title;
    font-size: $font-title;
    line-height: 1.5;
    @extend .text-overflow;
}

.tag {
    padding: 5px 6px;
    font-size: $font-tag;
    font-weight: 400;
    border-radius: $radius;
    background-color: $colore7;
    text-align: center;
    vertical-align: middle;
}

.user-avatar {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 1px solid #F3F3F3;
}

.week-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    text-align: center;
    background-color: rgba(75, 75, 75, 0.85);
    color: #fff;
    padding: 9px 20px;
    font-size: 15px;
    z-index: 999;
    &.alert-show {
        animation: show 2s;
    }
    @keyframes show {
        0% {
            transform: translateY(-100%);
        }
        20% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(0);
        }
        80% {
            transform: translateY(0);
        }
        100% {
            transform: translateY(-100%);
        }
    }
}

#brim-mask {
    pointer-events: none;
}

#page {
    padding-top: 44px;
    background-color:#fff;
    transition: all .3s ease;
    overflow-x:hidden;
}

.show-menu {
    transform: translateX($gap*40);
}

.page-cover {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 7;
}


/*模块入口样式*/

.posts-list {
    background-color: $white;
    li {
        padding: 10px $padding;
        border-bottom: $border;
    }
    h3 {
        @extend .title;
        &:before {
            content: attr(title);
            margin-right: 10px;
            margin-top: -3px;
            @extend .tag;
            color: $white;
        }
        &.top:before {
            background: #E74C3C;
        }
        &.ask:before {
            background: #3498DB;
        }
        &.good:before {
            background: #E67E22;
        }
        &.job:before {
            background: #9B59B6;
        }
        &.share:before {
            background: #1ABC9C;
        }
    }
    .content {
        padding-top: 10px;
        display: flex;
    }
    .avatar {
       @extend .user-avatar;
    }
    .info {
        display: block;
        width: 100%;
        flex: 1;
    }
    p {
        padding: 3px 0;
        display: flex;
        color: $text;
        font-size: $font-info;

        &:first-child {
            font-size: $font-content;
        }
        .name, time:first-child {
           display: block;
           width: 100%;
           flex: 1;
        }
        b {
            color: #42b983;
        }
    }
}

.page {
    background-color: $colorfff;
    height: 100%;
    padding: $gap*3 0;

    .reply_num {
        margin-top: $gap*4;
        background-color: $colore7;
        padding: $gap*2 0 $gap*2 $gap*2;
        border-top: solid 1px $colord4;
        border-bottom: solid 1px $colord4;
    }
    .reply-list {
        width: 100%;
        margin-top: $gap*3;
        ul {
            width: 100%;
            list-style: none;
            padding-left: 0;
            li {
                width: 100%;
                list-style: none;
                border-bottom: solid 1px $colord4;
                &:last-child {
                    border-bottom: none;
                }
                .uped {
                    color: $color80;
                }
                .icon {
                    font-size: 26px;
                }
            }
        }
    }
    .topic_content {
        margin: 0 $gap*2;
    }
    .reply {
        width: 100%;
        margin-top: $gap*3;
        border-top: solid 1px $colord4;
        .text {
            margin: $gap*3 2%;
            width: 96%;
            border-color: $colord4;
            color: #000;
        }
        .btn {
            display: inline-block;
            border-radius: $gap;
            text-align: center;
            font-size: 16px;
            margin: 0 2% $gap*3;
            width: 96%;
            background-color: $color80;
            padding: $gap*2 0;
            color: $colorfff;
        }
        .err {
            border-color: red;
        }
    }
    .message {
        border-bottom: solid 1px $colord4;
        padding: $gap*2 0;
    }
    .tabs {
        width: 100%;
        height: $gap*8.2;
        margin-top: $gap*6;
        list-style: none;
        border-bottom: solid 1px $colord4;
        position: relative;
        .item {
            width: 50%;
            padding: $gap*2.5 0;
            float: left;
            font-size: 16;
            text-align: center;
            font-weight: bold;
            
        }
        .read {
            font-size:$gap*5;
            color: $color80;
            position:absolute;
            right:$gap*1;
            top:$gap*1.5;
            font-weight:bold;
        }
        .br {
            border-right: solid 1px $colord4;
        }
        .selected {
            color: $red;
            border-bottom: solid 2px $red;
        }
    }
    .icon-empty {
        font-size: $gap*25;
        display: block;
    }
}

.topic-title {
    padding: $gap;
    margin:$padding;
    font-size: 18px;
    color: $title;
    line-height: 1.5;
    background-color:$colorf0;
    border-radius:$gap;
}

.author-info {
    display: flex;
    align-items: center;
    padding: 0 $padding;
    color: $text;
    font-size: 12px;
    .col {
        display: block;
        width: 100%;
        flex: 1;
    }
    .avatar {
        display: block;
        width: 40px;
        height: 40px;
        margin-right: $padding;
        border-radius: 50%;
    }
    .right{
        text-align: right;
    }
    span, time {
        display: block;
        padding: 5px 0;
    }
    .tag {
        @extend .tag;
        color: #ffffff;
        &.top {
            background: #E74C3C;
        }
        &.ask {
            background: #3498DB;
        }
        &.good {
            background: #E67E22;
        }
        &.job {
            background: #9B59B6;
        }
        &.share {
            background: #1ABC9C;
        }
    }
}
.topic-content {
    padding: $padding;
    margin-top: $padding;
    background: #ffffff;
    border-bottom: solid 1px $colord4;
    .from{
        color:$red;
    }
}
.topic-reply {
    @extend .title;
    padding: $padding;
    border-bottom: solid 1px $colord4;
    strong {
        color: #42b983;
    }
}
.reply_num {
    margin-top: $gap*4;
    background-color: $colore7;
    padding: $gap*2 0 $gap*2 $gap*2;
    border-top: solid 1px $colord4;
    border-bottom: solid 1px $colord4;
}
.reply-list {
    width: 100%;
    margin-top: $gap*3;
    ul {
        width: 100%;
        list-style: none;
        padding-left: 0;
        li {
            width: 100%;
            list-style: none;
            border-bottom: solid 1px $colord4;
            font-size:14px;
            &:last-child {
                border-bottom: none;
            }
            .uped {
                color: $color80;
            }
            .icon {
                font-size: 26px;
            }
            .from{
                color:$red;
            }
            .language-javascript{
                background-color:$colorf0;
                overflow-x:auto;
            }
        }
    }
}
